<%@ page import="entity.EquipmentBean" %>
<%@ page import="dao.EquipmentDAO" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%
    request.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8");
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Title</title>
    <link rel="stylesheet" href="../css/equipment_add.css">
    <script src="https://cdn.staticfile.net/jquery/2.1.1/jquery.min.js"></script>
    <script src="../js/equipment_addOredit.js"></script>
</head>
<body class="bkg">
<div>
    <div id="headDiv">
        <div id="logo">
            <img src="../img/edit.png" width="30" height="30"/>
        </div>
        <div id="title">编辑设备信息</div>
    </div>
    <div id="mainDiv">
        <form id="myForm" action="<%=request.getContextPath()%>/group/equipment/Equipment_save?id=<%=request.getParameter("id")%>" method="post">
            <div>
                <table>
                    <%
                        String eq_idd = request.getParameter("id");
                        int eq_id = 0;
                        if(eq_idd != null){
                            eq_id = Integer.parseInt(eq_idd);
                        }
                        EquipmentDAO eq_list_dao = new EquipmentDAO();
                        EquipmentBean list_add;
                        list_add = eq_list_dao.fillFormMessage(eq_id);
                    %>
                    <tr>
                        <td>设备名称<span class="red_star">*</span></td>
                        <td><input type="text" placeholder="请输入设备名称" id="equipment_information" class="border" name="eq_name" value="<%=list_add.getEq_name()%>"></td>
                        <td id="equipment_information1"></td>
                    </tr>
                    <tr>
                        <td>设备编号<span class="red_star">*</span></td>
                        <td><input type="text" placeholder="请输入设备编号(长度不超过八个字符)" id="equipment_number" class="border" name="eq_number" value="<%=list_add.getEq_number()%>"></td>
                        <td id="equipment_number1"></td>
                    </tr>
                    <tr>
                        <td>设备类型<span class="red_star">*</span></td>
                        <td><select class="border" id="equipment_type" name="eq_type" value="<%=list_add.getEq_type()%>">
                            <option value="请选择">
                                请选择
                            </option>
                            <option value="重型">
                                重型
                            </option>
                            <option value="中型">
                                中型
                            </option>
                            <option value="轻型">
                                轻型
                            </option>
                            <option value="便捷式">
                                便捷式
                            </option>
                            <option value="其他">
                                其他
                            </option>
                        </select></td>
                        <td id="equipment_type1"></td>
                    </tr>
                    <tr>
                        <td>供应商名称<span class="red_star">*</span></td>
                        <td><input type="text" placeholder="请输入供应商名称" class="border" id="equipment_producer" name="eq_producer" value="<%=list_add.getEq_producer()%>"></td>
                        <td id="equipment_producer1"></td>
                    </tr>
                    <tr>
                        <td>出厂日期<span class="red_star">*</span></td>
                        <td><input type="date" placeholder="请输入出厂日期" class="border" id="equipment_data" name="eq_data" value="<%=list_add.getEq_data()%>"></td>
                        <td id="equipment_data1"></td>
                    </tr>
                    <tr>
                        <td>质保期<span class="red_star">*</span></td>
                        <td><input type="text" placeholder="请输入质保期(数字＋年)" class="border" id="equipment_store_data" name="eq_store_data" value="<%=list_add.getEq_store_data()%>"></td>
                        <td id="equipment_store_data1"></td>
                    </tr>
                    <tr>
                        <td>售后联系人<span class="red_star">*</span></td>
                        <td><input type="text" placeholder="请输入售后联系人" class="border" id="equipment_after_sale" name="eq_after_sale" value="<%=list_add.getEq_after_sale()%>"></td>
                        <td id="equipment_after_sale1"></td>
                    </tr>
                    <tr>
                        <td>联系电话<span class="red_star">*</span></td>
                        <td><input type="text" placeholder="请输入联系电话(11位电话号码)" class="border" id="producer_phone_number" name="eq_phone" value="<%=list_add.getEq_phone()%>"></td>
                        <td id="producer_phone_number1"></td>
                    </tr>
                    <tr>
                        <td>质保说明<span class="red_star">*</span></td>
                        <td><input type="text" placeholder="请输入质保说明(在保或失效)" class="border" id="equipment_introduction" name="eq_introduction" value="<%=list_add.getEq_introduction()%>"></td>
                        <td id="equipment_introduction1"></td>
                    </tr>
                </table>
            </div>
            <div>
                <button id="return_index"><a href="<%=request.getContextPath()%>/group/equipment/Equipment_list">返回</a></button>
                <button id="save_message" class="button1" type="submit">保存</button>
                <button id="renew_message" type="reset">重置</button>
            </div>
        </form>
    </div>
</div>
</body>
</html>

